home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / gamma-bros.swf / scripts / __Packages / classes / fx / ShrapStorm.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.4 KB  |  47 lines

  1. class classes.fx.ShrapStorm
  2. {
  3.    var c;
  4.    var c2;
  5.    var stage = "A";
  6.    var Name = "shrapStorm";
  7.    function ShrapStorm()
  8.    {
  9.       this.c = 0;
  10.       this.c2 = 10;
  11.    }
  12.    function switchStage(which)
  13.    {
  14.       this.c = 0;
  15.       this.c2 = 10;
  16.       this.stage = which;
  17.    }
  18.    function createTypeA()
  19.    {
  20.       var _loc3_ = random(4);
  21.       _root.fxID = _root.fxID + 1;
  22.       _root["shrapnelB" + _root.fxID] = new classes.fx.ShrapnelB(_root.randRange(_root.posArray[_loc3_][0],_root.posArray[_loc3_][1]),_root.randRange(_root.posArray[_loc3_][2],_root.posArray[_loc3_][3]),_root.dirArray[_loc3_],_root.fxID);
  23.       _root.addFX("shrapnelB" + _root.fxID);
  24.       this.c = 0;
  25.       this.c2 = _root.randRange(10,50);
  26.       this.c2 *= 1 / _root.dif.speed;
  27.    }
  28.    function createTypeB()
  29.    {
  30.       var _loc3_ = random(4);
  31.       _root.fxID = _root.fxID + 1;
  32.       _root["shrapnelB" + _root.fxID] = new classes.fx.ShrapnelB(_root.randRange(_root.posArray[_loc3_][0],_root.posArray[_loc3_][1]),_root.randRange(_root.posArray[_loc3_][2],_root.posArray[_loc3_][3]),_root.dirArray[_loc3_],_root.fxID);
  33.       _root.addFX("shrapnelB" + _root.fxID);
  34.       this.c = 0;
  35.       this.c2 = _root.randRange(5,20);
  36.       this.c2 *= 1 / _root.dif.speed;
  37.    }
  38.    function main()
  39.    {
  40.       this.c = this.c + 1;
  41.       if(this.c >= this.c2)
  42.       {
  43.          this["createType" + this.stage]();
  44.       }
  45.    }
  46. }
  47.